package region

import (
	"context"

	commonSdk "github.com/wangzhe1991/grpc-sdk/pb/common"
	regionSdk "github.com/wangzhe1991/grpc-sdk/pb/region"

	"gitee.com/krio/grpc-go-server/internal/dependency"
)

type CountryService struct {
	countryR dependency.CountryRepository
}

func NewCountryService(cr dependency.CountryRepository) *CountryService {
	return &CountryService{
		countryR: cr,
	}
}

func (c *CountryService) List(ctx context.Context, req *commonSdk.EmptyRequest) (*regionSdk.CountryListResp, error) {
	return c.countryR.List(ctx, req)
}
